package com.upb.webserver.dao.entity;

import com.upb.webserver.common.enums.PlatformEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode
public class TbOrg implements Serializable {

    public TbOrg(Integer companyId) {
        this.companyId = companyId;
    }

    public TbOrg(Integer companyId, String orgName) {
        this.companyId = companyId;
        this.name = orgName;
    }

    public TbOrg(PlatformEnum platformEnum, int creatorAccountId) {
        this.createFromPlatform = platformEnum.getId();
        this.createBy = creatorAccountId;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.developer_id
     *
     * @mbg.generated
     */
    private Integer developerId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.company_id
     *
     * @mbg.generated
     */
    private Integer companyId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.name
     *
     * @mbg.generated
     */
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.suffix
     *
     * @mbg.generated
     */
    private String suffix;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.status
     *
     * @mbg.generated
     */
    private Byte status;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.create_from_platform
     *
     * @mbg.generated
     */
    private Byte createFromPlatform;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.create_by
     *
     * @mbg.generated
     */
    private Integer createBy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.gmt_create
     *
     * @mbg.generated
     */
    private Date gmtCreate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.gmt_modified
     *
     * @mbg.generated
     */
    private Date gmtModified;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_org.description
     *
     * @mbg.generated
     */
    private String description;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table tb_org
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;
}
